{% extends 'mobile_base_frame.html'%}
{% load i18n %}
{% block page %}
<div data-role="page" id="simple_page">
  <div data-role="header" data-theme="b" data-position="fixed" data-iconpos="notext">
	 <a data-role="button" data-iconpos="notext" data-icon="back" data-rel="back"></a>
     <h1>{{title}}</h1>
     <a href="#info" data-rel="popup" data-role="button" data-icon="user" data-iconpos="notext" class="ui-btn-right">Grid</a>
  </div>
  <div data-role="content" >
    <table class="wap-table">
	{% for f in fields %}
        <tr>
        {% autoescape off %}
           <th>{{f.label}}:</th>
           {% ifequal f.label "审核状态" %}
           <td>{{f.data|audit_filter}}</td>
           {% else%}
           <td>{{f.data|default:""}}</td>
           {% endifequal%}
        {% endautoescape %}
        </tr>
    {% endfor %}
	</table>
	<div style="text-align:center">
	   <div data-role="controlgroup" data-type="horizontal">
          {% if instance|wap_filter_action %}
	        {% for action in actions %}
                  {% if 'change' in action.0|lower or  'delete' in action.0|lower %}
                  {% else %}
                  <a href="/wap/{{model_app}}/{{model_name}}/_op_/{{action.0}}/?K={{datakey}}" data-role="button" data-ajax="false">{{action.1.verbose_name}}</a>
                  {% endif %}
            {% endfor %}
          {% else %}
             {% for action in actions %}
                  {% if 'change' in action.0|lower  %}
                  <a href="/wap/{{model_app}}/{{model_name}}/{{datakey}}/?app_label={{app_label}}" data-role="button" data-ajax="false">{{action.1.verbose_name}}</a>
                  {% else %}
                  <a href="/wap/{{model_app}}/{{model_name}}/_op_/{{action.0}}/?K={{datakey}}" data-role="button" data-ajax="false">{{action.1.verbose_name}}</a>
                  {% endif %}
              {% endfor %}
          {% endif %}
		</div>
	</div>
    <div data-role="popup" id="help_txt">
        <p>{{title}}{% trans '详细' %}<p>
    </div>
    <div data-role="popup" id="info">
         <ul data-role="listview">
           <li data-icon="false"><a href="#" data-icon="false">{% trans "姓名" %}:{{employee.EName}}</a></li>
           <li data-icon="false"><a href="#" >{% trans "工号" %}:{{employee.PIN}}</a></li>
           <li data-icon="false"><a href="#" id="logout">{% trans '退出' %}</a></li>
         </ul>
    </div>
    <div data-role="popup" id="event_info">
         <p>© 2014 中控科技</p>
    </div>

  </div>
  <div data-role="footer" data-theme="b">
    <div data-role="navbar" data-theme="b">
        <ul>
            <li><a href="#help_txt" data-rel="popup" data-icon="info" data-theme="b"></a></li>
            <!--<li><a href="#event_info" data-rel="popup" data-icon="star" data-theme="b"></a></li>-->
            <li><a href="/{{app_label}}/{{app_menu}}/UI/" data-icon="home" data-theme="b"></a></li>
        </ul>
    </div><!-- /navbar -->
  </div>
</div>
{% endblock %}